package model

type RoomSeat struct {
	Id         int64  `gorm:"primaryKey;column:id"json:"id" `
	SchoolId   int64  `gorm:"column:school_id;default:0"json:"school_id"`
	JzwId      int64  `gorm:"column:jzw_id;default:0"json:"jzw_id"`
	FloorId    int64  `gorm:"column:floor_id;default:0"json:"floor_id"`
	RoomId     int64  `gorm:"column:room_id;default:0"json:"room_id"`
	SeatNumber string `gorm:"column:seat_number;default:''" json:"seat_number"`
	OId        int64  `gorm:"column:o_id;default:0" json:"o_id"`
	CreateTime int64  `gorm:"column:create_time;default:0" json:"create_time" `
}

func (RoomSeat) TableName() string {
	return "fd_room_seat"
}

type RoomSeatRJzwFloorRoom struct {
	Id         int64     `json:"id" `
	SchoolId   int64     `json:"school_id"`
	JzwId      int64     `json:"jzw_id"`
	FloorId    int64     `json:"floor_id"`
	RoomId     int64     `json:"room_id"`
	SeatNumber string    `json:"seat_number"`
	CreateTime int64     `json:"create_time" `
	Jzw        JoinJzw   `json:"jzw" gorm:"foreignKey:id;references:jzw_id"`
	Floor      JoinFloor `json:"floor" gorm:"foreignKey:id;references:floor_id"`
	Room       JoinRoom  `json:"room" gorm:"foreignKey:id;references:room_id"`
}

func (RoomSeatRJzwFloorRoom) TableName() string {
	return "fd_room_seat"
}
